package cn.edu.fzu.homemaking.company.domain.enums;

public enum SexEnum {

    SECRET(-1, "保密"),
    MAN(0, "男"),

    WOMAN(1, "女");

    private final int    value;
    private final String desc;

    SexEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static SexEnum parse(int value) {
        switch (value) {
            case -1:
                return SECRET;
            case 0:
                return MAN;
            case 1:
                return WOMAN;
            default:
                return null;
        }
    }

}
